﻿using System.Drawing;

namespace GeekShop
{
    public class Layer
    {
        #region Fields
        private Bitmap bitmap;
        private Point location;
        private string name;
        private int opacity;
        private bool visible;
        #endregion

        #region Properties
        public Bitmap Bitmap
        {
            get { return bitmap; }
            set { bitmap = value; }
        }
        public Point Location
        {
            get { return location; }
            set { location = value; }
        }
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public int Opacity
        {
            get { return opacity; }
            set 
            {
                if (value >= 0 && value <= 100)
                {
                    opacity = value;
                }
            }
        }
        public bool Visible
        {
            get { return visible; }
            set { visible = value; }
        }
        #endregion

        #region Virtual Properties
        public Size Size
        {
            get { return this.bitmap.Size; }
        }
        public Rectangle Rectangle
        {
            get { return new Rectangle(this.location, this.bitmap.Size); }
        }
        #endregion
    }
}
